izmir_fish <- read_rds("https://github.com/yunusemre91/mef05-yunusemre91/raw/4cff5ff2b681a8ae9238dc9e4824ba00834dfeb1/izmir_balik.rds")

1) Structure of the Data

Before starting to analyze Izmir Fish Market lets first see the structure of the data.

str(izmir_fish)
## 'data.frame':    23528 obs. of  7 variables:
##  $ X_id        : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ TARIH       : chr  "2021-01-02T00:00:00" "2021-01-02T00:00:00" "2021-01-02T00:00:00" "2021-01-02T00:00:00" ...
##  $ MAL_TURU    : chr  "BALIK" "BALIK" "BALIK" "BALIK" ...
##  $ MAL_ADI     : chr  "TIRSI (DENİZ)" "KIRLANGIÇ (DENİZ)" "ÇİMÇİM (DENİZ)" "HANOS ( DENİZ )" ...
##  $ BIRIM       : chr  "KG" "KG" "KG" "KG" ...
##  $ ASGARI_UCRET: num  5.83 3 3.5 2.5 45 130 38 25 10 2.5 ...
##  $ AZAMI_UCRET : num  12.5 80 8 5 45 130 38 55 10 6.67 ...

2) Data Cleaning

  • X_id column will not be used in the whole process. That’s why I’ve set is as NULL.
  • The type of the Date column of data has been changed from character to date.
  • Year-Month and Month Columns are added.
  • The order of new columns have been changed.
izmir_fish$X_id <- NULL
izmir_fish$TARIH <- as.Date(izmir_fish$TARIH)

names(izmir_fish)[1] <- 'Date'

#Adding and moving year-month column and erasing the last column.
izmir_fish<-izmir_fish %>%
  mutate(YEARMONTH = format(as.Date(izmir_fish$Date), "%Y-%m"))
izmir_fish$YEARMONTH <- as.yearmon(izmir_fish$YEARMONTH, format="%Y-%m")

izmir_fish <- izmir_fish %>%
  mutate(MONTH = format(as.Date(izmir_fish$Date), "%m"))
izmir_fish$MONTH <- as.numeric(as.character(izmir_fish$MONTH))

izmir_fish <- izmir_fish[,c(1,7,8,2,3,4,5,6)]

3) Monthly Average Maximum and Minimum Prices

The table below present monthly average price of each fish in the year. Each column can be sorted manually and different fish can be filtered using search box.

4) Volatility in prices, table

Yearly change percentage in prices can be seen from the table below. This percentage is obtained by the ratio of mean maximum price of a fish to the mean minimum price of the fish. Therefore Kerevit (Deniz) has the most volatile price out of 128 different price.

5) Monthly Mean Price by Type

-The graph below shows the monthly average price change of fish by type, BALIK, ITHAL, KULTUR and DONUK. Dashed lines show the mean ASGARI_UCRET change by type.

  • It can be observed from the graph that fish prices are at the minimum at the beginning of the year and monotonically increases throughout the year. BALIK and KULTUR types exhibits a greater increase compared to İTHAL and TATLI SU types.
  • The reason why we observe such a difference between meanMax and meanMin prices of such types (BALIK and KULTUR) can be the volume of the trade. DONUK and TATLI SU types could have comperatively small trade volume resulting in small differences between meanMax and meanMin prices and a slower increase throughout the year.
## `geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
## `geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'